const { Controller } = require("uni-cloud-router");
module.exports = class BannersController extends Controller {
  add(){
		const { ctx, service } = this;
    return this.service.banners.add(ctx.data);
  }
	edit(){
		const { ctx, service } = this;
		const id=ctx.data.id;
		delete ctx.data.id;
	  return this.service.banners.edit(id,ctx.data);
	}
	getOne(){
		const { ctx, service } = this;
		return this.service.banners.getOne(ctx.data.id);
	}
	list(){
		const { ctx, service } = this;
		return this.service.banners.list(ctx.data.cate_id);
	}
	delete(){
		const { ctx, service } = this;
		return this.service.banners.delete(ctx.data);
	}
};